const swiper = document.querySelector('#swiper');
const login = document.querySelector('#login');
const register = document.querySelector('#register');
function appendNewCard(cardCounts) {
  const card = new Card({
    onDismiss: appendNewCard,
    cardCount: cardCounts,
  });
  swiper.append(card.element);

  const cards = swiper.querySelectorAll('.card:not(.dismissing)');
  cards.forEach((card, index) => {
    card.style.setProperty('--i', index);

    });

}
function addcard (){
  const add = document.querySelectorAll('.card');
  add[0].append(login);
  add[1].append(register);
}
for (let i = 0; i < 2; i++) {
  appendNewCard(i);

}

addcard();